package com.songmy.spider.run.vo;

/****
 * 选择器类型
 * @author Marc
 * @version 1.0
 */
public enum MySelectorType {
	XPATH("XPATH"),JSON("JSON"),REGEX("REGEX"), CSS("CSS"),ID("ID");
	
	
	private String name = null ; 
	private MySelectorType(String name) {
		this.name = name ;
	}
	
	
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}


	public static MySelectorType getMethod (String name){
		for (MySelectorType method : MySelectorType.values()) {
			if(method.getName().equalsIgnoreCase(name)){
				return method ; 
			}
		}
		return null ; 
	}
}
